<div class="box">
  <div class="box-header">
        <span class="box-title">
            <div class="input-group">
              <a href="" ui-sref="^.list" class=" btn btn-default " style="float: left;" translate><i
                class="fa fa-arrow-left"></i> Users</a>
            </div>
        </span>

    <div class="box-tools pull-right">
            <span class="pull-right btn-group">
            <button class="btn btn-primary btn-success btn-sm" ng-click="onSubmit()" translate><i class="fa fa-save"></i> Save
            </button>
            <a href="" class="btn btn-sm btn-default" ng-click="delete({id: page.id})">
              <i class="fa fa-trash-o"></i>
            </a>
          </span>
    </div>
  </div>
  <div class="box-body">
    <div class="alert alert-danger" ng-if="addError" translate>Could not add user!</div>

    <formly-form result="user" fields="formFields" options="formOptions" ng-submit="onSubmit()"></formly-form>
    
    <div ng-if="!user.id" class="form-group">
      <label translate>Password</label>
      <input type="text" class="form-control" ng-model="user.password" required/>
    </div>

  </div>
  <div ng-if="loading" class="overlay"></div>
  <div ng-if="loading" class="loading-img"></div>
</div>
